package com.anolesoft.yr.util;

import cn.hutool.core.lang.UUID;
import org.springframework.util.StringUtils;

/**
 * @author zhj
 * @date 2020/8/8 14:50
 */
public final class CommonUtils {
    private CommonUtils(){

    }

    public static String warpStringNull(String str){
        if(StringUtils.isEmpty(str)){
            return null;
        }
        return warpString(str, "%");
    }

    public static String warpString(String str){
        return warpString(str, "%");
    }

    public static String warpString(String str, String symbol){
        return symbol + str + symbol;
    }

    public static String stringNull(String str){
        if(StringUtils.isEmpty(str)){
            return null;
        }
        return str;
    }

    public static String fastUUID(){
        return UUID.fastUUID().toString().replace("-", "");
    }

}
